1. Field of the Invention
The apparatus and method according to the invention pertains to microcontrollers, and more specifically, to a microcontroller providing a direct memory access unit that sends data to and stores data from a synchronous serial interface.
2. Description of the Related Art
Although consumers readily recognize the impact of personal computers in our society, they may be less aware of other manifestations of microcomputers within everyday life. Industrial and consumer products often require dedicated intelligence of their own, and to this end, the same technology that powers a personal computer has found its way into everyday industrial and consumer goods, such as cellular phones, televisions, stereo systems, and a wide variety of other products. Similarly, scientific instrumentation, communications systems, and control systems invariably include microcontrollers.
A centerpiece of this technology is known as a microcontroller, or embedded controller, which in effect is a microprocessor as used in a personal computer, but with a great deal of additional functionality combined onto the same monolithic semiconductor substrate (i.e., chip). In a typical personal computer, the microprocessor performs the basic computing functions, but other integrated circuits perform functions such as communicating over a network, controlling the computer memory, and providing input/output with the user.
In a typical microcontroller, many of these functions are embedded within the integrated circuit chip itself. A typical microcontroller, such as the Am186EM or AM186ES by Advanced Micro Devices, Inc., of Sunnyvale, Calif., not only includes a core microprocessor, but further includes a memory controller, a direct memory access (DMA) controller, an interrupt controller, and both asynchronous and synchronous serial interfaces. In computer systems, these devices are typically implemented as separate integrated circuits, requiring a larger area and increasing the size of the product. By embedding these functions within a single chip, size is dramatically reduced, often important in consumer products.
From a consumer products designer's viewpoint, often the particular combination of added features make a particular microcontroller attractive for a given application. Many microcontrollers are available that use the standard 80.times.86 microprocessor instructions, allowing for software to be easily developed for such microcontrollers. Because of the similar execution unit instruction sets, the added features often become principal differentiating criteria between particular microcontrollers.
Often, a synchronous serial communication port, or interface, is implemented in a microcontroller. A synchronous serial communication port allows the microcontroller to communicate with other devices or over data lines by sequentially sending and receiving bits of data, with that data being clocked by a clock signal also provided by the synchronous serial communication port. When two devices synchronously communicate, one generally acts as the master and the other the slave, with the master providing the serial clock. Other configurations are also possible, but a master/slave synchronous serial communications arrangement is often used in microcontroller or embedded controller applications for data communications. It is a simple configuration using few signal lines but allowing for very high speed data communication-much higher than asynchronous serial ports. This latter aspect is true because the transmitted lock synchronizes the two devices.
Synchronous serial communication ports are not only useful for high speed data communication over data communication lines, but are also useful for providing simple communications among devices within an embedded system. For example, even using microcontrollers a number of integrated circuits are often implemented in a single system, with a need for side band communications between those integrated circuits, such as for configuration, monitoring, and other purposes. To this end, a synchronous serial interface (SSI) bus was developed. This is a synchronous communication bus in which more than one device can act as master, driving the clock signal. But whatever synchronous protocol is chosen, in system level communication, a synchronous serial bus is a simple and effective technique for interdevice communication.
Therefore, it is often desirable in embedded systems in which a microcontroller is implemented to provide a synchronous serial port either for communications over data lines or among devices within the embedded system. For examples a microcontroller may be implemented controlling a number of communication chips, and desire to periodically obtain status from those chips. A synchronous serial communications port is a particularly suitable communication medium for doing so, requiring few chips, no independent synchronization of an asynchronous port, and high speed.
In implementing microcontrollers in embedded systems, another common requirement or desirable feature is the reduction of the bandwidth needed by any particular portion of the microcontroller in negotiating with other portions. For example, the core of a microcontroller is the execution unit, which is essentially a microprocessor core. It should be free to perform the programmed task to which it is dedicated, rather than spending time waiting on other units within the microcontroller. As described above, such units include I/O units, such as a parallel I/O, an asynchronous serial port, and a synchronous serial port, all of which are typically slow relative (long latency) to the execution unit.
Often helpful in freeing up the execution unit are direct memory access (DMA) units, timer control units, and interrupt control units. Such units off-load the tasks of waiting for certain external transactions to take place, and, in the case of the DMA unit, actually off-loading the task itself. The DMA unit can be programmed to perform transfers between memory locations, or between memory locations and an input/output port. Off-loading these tasks, the execution unit is freed from having to wait for such transfers to take place. Further, DMA does not require code or CPU overhead to perform reads and writes. This code and CPU overhead of non-DMA transactions reduces available system bandwidth.
DMA units have, in the past, been implemented in a microcontroller to provide direct memory access transfers between an asynchronous serial port and memory. The DMA unit is programmed with a starting point in memory and a destination asynchronous serial port (either memory or I/O mapped). The DMA unit repeatedly transfers data from memory to the asynchronous serial port, or vice versa, waiting for the asynchronous serial port to be ready for additional data before providing the next transfer. Such DMA frees the execution unit to continue performing whatever processing tasks it has been assigned.
Further improvements to a microcontroller by decoupling tasks among the various control units would be desirable.